﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OleDb;
namespace DataAccess
{
    public class DAL
    {
        public OleDbConnection KetNoi()
        {
            //return new OleDbConnection("Data Source=UT-CUI-BAP; Initial Catalog=Test;Integrated Security=SSPI");
            return new OleDbConnection("Provider=SQLNCLI10;Data Source=UT-CUI-BAP;Password= muadong;User= sa;Initial Catalog=Test;Integrated Security=SSPI");
        }
        
        public void ExcutinonQuery(string sql)
        {
            OleDbConnection con = KetNoi();//new OleDbConnection("Provider=SQLNCLI10;Data Source=UT-CUI-BAP;Password= muadong;User= sa;Initial Catalog=Test;Integrated Security=SSPI");
            con.Open();
            OleDbCommand comman = new OleDbCommand(sql,con);
            comman.ExecuteNonQuery();
            comman.Dispose();
            con.Close();
        }

    }
}
